package Day31;

public class HomewWork2 {
    public static void main(String[] args) {
        Father father = new Father("jack"){
            @Override
            public void cry() {
                System.out.println("爸爸在微笑");
            }
        };
        father.cry();
    }
}

abstract  class Father{
    private String name;
    public Father() {
    }

    public Father(String name) {
        this.name = name;
    }

    public abstract void cry();
}